<script setup>
import { ref } from 'vue'
const msg = ref('我是子组件')
const showAlert = () => {
  alert('666 888')
}
defineExpose({
  msg,
  showAlert,
})
</script>
<template>
  <div>测试组件</div>
  <div>{{ msg }}</div>
</template>
